package com.mrptech.mess.model;

// Generated Feb 15, 2015 10:58:50 PM by Hibernate Tools 4.0.0

import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

/**
 * UserPasswords generated by hbm2java
 */
@Entity
@Table(name = "USER_PASSWORDS")
public class UserPasswords implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private BigDecimal accountId;
	private Users users;
	private String pin;
	private BigDecimal pinRetryCount;
	private BigDecimal pinStatus;
	private Date creationDate;
	private Date expirationDate;
	private String authenticationType;
	private String passwordChangeFlag;

	public UserPasswords() {
	}

	public UserPasswords(Users users) {
		this.users = users;
	}

	public UserPasswords(Users users, String pin, BigDecimal pinRetryCount,
			BigDecimal pinStatus, Date creationDate, Date expirationDate,
			String authenticationType, String passwordChangeFlag) {
		this.users = users;
		this.pin = pin;
		this.pinRetryCount = pinRetryCount;
		this.pinStatus = pinStatus;
		this.creationDate = creationDate;
		this.expirationDate = expirationDate;
		this.authenticationType = authenticationType;
		this.passwordChangeFlag = passwordChangeFlag;
	}

	@GenericGenerator(name = "generator", strategy = "foreign", parameters = @Parameter(name = "property", value = "users"))
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "ACCOUNT_ID", unique = true, nullable = false, precision = 22, scale = 0)
	public BigDecimal getAccountId() {
		return this.accountId;
	}

	public void setAccountId(BigDecimal accountId) {
		this.accountId = accountId;
	}

	@OneToOne(fetch = FetchType.LAZY)
	@PrimaryKeyJoinColumn
	public Users getUsers() {
		return this.users;
	}

	public void setUsers(Users users) {
		this.users = users;
	}

	@Column(name = "PIN", length = 200)
	public String getPin() {
		return this.pin;
	}

	public void setPin(String pin) {
		this.pin = pin;
	}

	@Column(name = "PIN_RETRY_COUNT", precision = 22, scale = 0)
	public BigDecimal getPinRetryCount() {
		return this.pinRetryCount;
	}

	public void setPinRetryCount(BigDecimal pinRetryCount) {
		this.pinRetryCount = pinRetryCount;
	}

	@Column(name = "PIN_STATUS", precision = 22, scale = 0)
	public BigDecimal getPinStatus() {
		return this.pinStatus;
	}

	public void setPinStatus(BigDecimal pinStatus) {
		this.pinStatus = pinStatus;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "CREATION_DATE", length = 7)
	public Date getCreationDate() {
		return this.creationDate;
	}

	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "EXPIRATION_DATE", length = 7)
	public Date getExpirationDate() {
		return this.expirationDate;
	}

	public void setExpirationDate(Date expirationDate) {
		this.expirationDate = expirationDate;
	}

	@Column(name = "AUTHENTICATION_TYPE", length = 30)
	public String getAuthenticationType() {
		return this.authenticationType;
	}

	public void setAuthenticationType(String authenticationType) {
		this.authenticationType = authenticationType;
	}

	@Column(name = "PASSWORD_CHANGE_FLAG", length = 30)
	public String getPasswordChangeFlag() {
		return this.passwordChangeFlag;
	}

	public void setPasswordChangeFlag(String passwordChangeFlag) {
		this.passwordChangeFlag = passwordChangeFlag;
	}

}
